<p class="validateTips">请输入以下内容.</p>

<form id="adsForm"
	action="<?php echo URL::site("boAds/update")?>" method='post'
	enctype="multipart/form-data">
<?php echo Form::hidden("id",$result->id)?>
<table id="supplier" class="ui-widget ui-widget-content" width="100%">
	<tr>
		<td width="30%"><label>广告类别</label></td>
		<td width="70%"><select id="type" name="type"
			class="text ui-widget-content ui-corner-all">
			<?php 
				foreach ($typeArray as $item){
					echo "<option value=".$item;
					if ($item == $result->type){
						echo " selected ";
					}
					echo ">".$item."</option>";
				}
			?>
		</select></td>
	</tr>
	<tr>
		<td width="30%">广告地址或商家ID*</td>
		<td><input type="text" name="value" id="value"
			class="text ui-widget-content ui-corner-all" value="<?php echo $result->value?>" /></td>
	</tr>
	<tr>
		<td>图片地址</td>
		<td><?php 
			if (!empty($result->picture)){
					echo '<a target="_blank" href="'.URL::domain().ADS_IMG_PATH.$result->picture.'"><img src="'.URL::domain().ADS_IMG_PATH.$result->picture.'" style="height:14ps" width="200ps" /></a>';
				}
			echo Form::file('file', array('id'=>'file','class'=>'text ui-widget-content ui-corner-all'));
			?></td>
	</tr>
	<tr>
		<td>广告位置</td>
		<td><select id="position" name="position"
			class="text ui-widget-content ui-corner-all">
			<option value="首页">首页</option>
		</select></td>
	</tr>
	<tr>
		<td>显示顺序</td>
		<td><input type="text" name="sort" id="sort"
			class="text ui-widget-content ui-corner-all" value="<?php echo $result->sort?>" /></td>
	</tr>
	<tr>
		<td>备注*</td>
		<td><textarea name="desc" id="desc"
			class="text ui-widget-content ui-corner-all desc"><?php echo $result->desc?></textarea></td>
	</tr>
</table>
</form>
